package com.hk.userapi.api;

import com.hk.model.WxPermission;
import com.hk.model.vo.Result;
import com.hk.model.vo.ResultVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: aerfazhe
 * @Date: 2021/8/10 19:34
 * @Statement: 管理员API
 */
public interface UserApi {

    /**
     * 匹配当前用户是否具有该缺陷
     * @param uri 请求路径
     * @param id 当前登录用户Id
     * @return
     */
    @GetMapping("/admin/permission-to-check")
    Result permissionToCheck(@RequestParam("uri")String uri,@RequestParam("id") Integer id);


    /**
     * 查询所有权限 权限分配时根据type=2 只查询按钮类型权限
     * @param page
     * @param limit
     * @param permission
     * @return
     */
    @GetMapping(value = "/permission/pageList")
    ResultVO<WxPermission> pageList(
            @RequestParam(value = "page",defaultValue = "1") Integer page,
            @RequestParam(value = "limit",defaultValue = "10") Integer limit,
            @RequestParam("permission") WxPermission permission,
            @RequestParam("type") Integer type
    );

}
